@import "./../var.scss";
@import "./position.scss";
@import "./shadow.scss";

@mixin iconbtn($position: bottom) {
  display: inline-block;
  vertical-align: top;
  cursor: pointer;
  transition: all ease-in-out 0.3s;
  color: $f1;
  .icon {
    text-align: center;
    line-height: 35px;
    width: 35px;
    position: relative;
    svg {
      transition: all ease-in 0.2s;
    }
  }
  &.disabled {
    color: $f4;
    cursor: not-allowed;
  }
  &.focus {
    &::before {
      content: "";
      display: block;
      width: 26px;
      height: 26px;
      border-radius: 2px;
      @include absolute(7px, 7px, 7px, 7px);
      background: $f7;
      box-shadow: 0 0 3px $f5 inset;
    }
  }
  &:hover {
    color: $a1;
    .name {
      visibility: visible;
      opacity: 1;
    }
  }
  &:active {
    .icon {
      svg {
        transform: scale(1.2);
      }
    }
  }
}

@mixin largeBtn {
  line-height: 50px;
  text-align: center;
  width: 50px;
  @include iconbtn();
  background: $f8;
  border-radius: 50%;
  @include boxShadow(1);
  border: 0;
  outline: none;
  transition: all ease 0.2s;
  &:hover {
    @include boxShadow(3);
    background: $f9;
    color: $a1;
  }
  &:active {
    @include boxShadow(7);
    background: $f9;
    color: $a1;
  }
}
